\(\int x (a+b \log (c x^n))^3 \, dx\) [59]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 77 \[ \int x \left (a+b \log \left (c x^n\right )\right )^3 \, dx=-\frac {3}{8} b^3 n^3 x^2+\frac {3}{4} b^2 n^2 x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {3}{4} b n x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^3 \]

[Out]

-3/8*b^3*n^3*x^2+3/4*b^2*n^2*x^2*(a+b*ln(c*x^n))-3/4*b*n*x^2*(a+b*ln(c*x^n))^2+1/2*x^2*(a+b*ln(c*x^n))^3

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2342, 2341} \[ \int x \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {3}{4} b^2 n^2 x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {3}{4} b n x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^3-\frac {3}{8} b^3 n^3 x^2 \]

[In]

Int[x*(a + b*Log[c*x^n])^3,x]

[Out]

(-3*b^3*n^3*x^2)/8 + (3*b^2*n^2*x^2*(a + b*Log[c*x^n]))/4 - (3*b*n*x^2*(a + b*Log[c*x^n])^2)/4 + (x^2*(a + b*L
og[c*x^n])^3)/2

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^3-\frac {1}{2} (3 b n) \int x \left (a+b \log \left (c x^n\right )\right )^2 \, dx \\ & = -\frac {3}{4} b n x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^3+\frac {1}{2} \left (3 b^2 n^2\right ) \int x \left (a+b \log \left (c x^n\right )\right ) \, dx \\ & = -\frac {3}{8} b^3 n^3 x^2+\frac {3}{4} b^2 n^2 x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {3}{4} b n x^2 \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right )^3 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.78 \[ \int x \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {1}{8} x^2 \left (4 \left (a+b \log \left (c x^n\right )\right )^3-3 b n \left (b n \left (-2 a+b n-2 b \log \left (c x^n\right )\right )+2 \left (a+b \log \left (c x^n\right )\right )^2\right )\right ) \]

[In]

Integrate[x*(a + b*Log[c*x^n])^3,x]

[Out]

(x^2*(4*(a + b*Log[c*x^n])^3 - 3*b*n*(b*n*(-2*a + b*n - 2*b*Log[c*x^n]) + 2*(a + b*Log[c*x^n])^2)))/8

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(140\) vs. \(2(69)=138\).

Time = 0.24 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.83

method result size
parallelrisch \(\frac {x^{2} b^{3} \ln \left (c \,x^{n}\right )^{3}}{2}-\frac {3 \ln \left (c \,x^{n}\right )^{2} x^{2} b^{3} n}{4}+\frac {3 \ln \left (c \,x^{n}\right ) x^{2} b^{3} n^{2}}{4}-\frac {3 b^{3} n^{3} x^{2}}{8}+\frac {3 x^{2} a \,b^{2} \ln \left (c \,x^{n}\right )^{2}}{2}-\frac {3 \ln \left (c \,x^{n}\right ) x^{2} a \,b^{2} n}{2}+\frac {3 a \,b^{2} n^{2} x^{2}}{4}+\frac {3 x^{2} a^{2} b \ln \left (c \,x^{n}\right )}{2}-\frac {3 a^{2} b n \,x^{2}}{4}+\frac {x^{2} a^{3}}{2}\) \(141\)
risch \(\text {Expression too large to display}\) \(2650\)

[In]

int(x*(a+b*ln(c*x^n))^3,x,method=_RETURNVERBOSE)

[Out]

1/2*x^2*b^3*ln(c*x^n)^3-3/4*ln(c*x^n)^2*x^2*b^3*n+3/4*ln(c*x^n)*x^2*b^3*n^2-3/8*b^3*n^3*x^2+3/2*x^2*a*b^2*ln(c
*x^n)^2-3/2*ln(c*x^n)*x^2*a*b^2*n+3/4*a*b^2*n^2*x^2+3/2*x^2*a^2*b*ln(c*x^n)-3/4*a^2*b*n*x^2+1/2*x^2*a^3

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 222 vs. \(2 (69) = 138\).

Time = 0.30 (sec) , antiderivative size = 222, normalized size of antiderivative = 2.88 \[ \int x \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {1}{2} \, b^{3} n^{3} x^{2} \log \left (x\right )^{3} + \frac {1}{2} \, b^{3} x^{2} \log \left (c\right )^{3} - \frac {3}{4} \, {\left (b^{3} n - 2 \, a b^{2}\right )} x^{2} \log \left (c\right )^{2} + \frac {3}{4} \, {\left (b^{3} n^{2} - 2 \, a b^{2} n + 2 \, a^{2} b\right )} x^{2} \log \left (c\right ) - \frac {1}{8} \, {\left (3 \, b^{3} n^{3} - 6 \, a b^{2} n^{2} + 6 \, a^{2} b n - 4 \, a^{3}\right )} x^{2} + \frac {3}{4} \, {\left (2 \, b^{3} n^{2} x^{2} \log \left (c\right ) - {\left (b^{3} n^{3} - 2 \, a b^{2} n^{2}\right )} x^{2}\right )} \log \left (x\right )^{2} + \frac {3}{4} \, {\left (2 \, b^{3} n x^{2} \log \left (c\right )^{2} - 2 \, {\left (b^{3} n^{2} - 2 \, a b^{2} n\right )} x^{2} \log \left (c\right ) + {\left (b^{3} n^{3} - 2 \, a b^{2} n^{2} + 2 \, a^{2} b n\right )} x^{2}\right )} \log \left (x\right ) \]

[In]

integrate(x*(a+b*log(c*x^n))^3,x, algorithm="fricas")

[Out]

1/2*b^3*n^3*x^2*log(x)^3 + 1/2*b^3*x^2*log(c)^3 - 3/4*(b^3*n - 2*a*b^2)*x^2*log(c)^2 + 3/4*(b^3*n^2 - 2*a*b^2*
n + 2*a^2*b)*x^2*log(c) - 1/8*(3*b^3*n^3 - 6*a*b^2*n^2 + 6*a^2*b*n - 4*a^3)*x^2 + 3/4*(2*b^3*n^2*x^2*log(c) -
(b^3*n^3 - 2*a*b^2*n^2)*x^2)*log(x)^2 + 3/4*(2*b^3*n*x^2*log(c)^2 - 2*(b^3*n^2 - 2*a*b^2*n)*x^2*log(c) + (b^3*
n^3 - 2*a*b^2*n^2 + 2*a^2*b*n)*x^2)*log(x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 167 vs. \(2 (75) = 150\).

Time = 0.24 (sec) , antiderivative size = 167, normalized size of antiderivative = 2.17 \[ \int x \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {a^{3} x^{2}}{2} - \frac {3 a^{2} b n x^{2}}{4} + \frac {3 a^{2} b x^{2} \log {\left (c x^{n} \right )}}{2} + \frac {3 a b^{2} n^{2} x^{2}}{4} - \frac {3 a b^{2} n x^{2} \log {\left (c x^{n} \right )}}{2} + \frac {3 a b^{2} x^{2} \log {\left (c x^{n} \right )}^{2}}{2} - \frac {3 b^{3} n^{3} x^{2}}{8} + \frac {3 b^{3} n^{2} x^{2} \log {\left (c x^{n} \right )}}{4} - \frac {3 b^{3} n x^{2} \log {\left (c x^{n} \right )}^{2}}{4} + \frac {b^{3} x^{2} \log {\left (c x^{n} \right )}^{3}}{2} \]

[In]

integrate(x*(a+b*ln(c*x**n))**3,x)

[Out]

a**3*x**2/2 - 3*a**2*b*n*x**2/4 + 3*a**2*b*x**2*log(c*x**n)/2 + 3*a*b**2*n**2*x**2/4 - 3*a*b**2*n*x**2*log(c*x
**n)/2 + 3*a*b**2*x**2*log(c*x**n)**2/2 - 3*b**3*n**3*x**2/8 + 3*b**3*n**2*x**2*log(c*x**n)/4 - 3*b**3*n*x**2*
log(c*x**n)**2/4 + b**3*x**2*log(c*x**n)**3/2

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.75 \[ \int x \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {1}{2} \, b^{3} x^{2} \log \left (c x^{n}\right )^{3} + \frac {3}{2} \, a b^{2} x^{2} \log \left (c x^{n}\right )^{2} - \frac {3}{4} \, a^{2} b n x^{2} + \frac {3}{2} \, a^{2} b x^{2} \log \left (c x^{n}\right ) + \frac {1}{2} \, a^{3} x^{2} + \frac {3}{4} \, {\left (n^{2} x^{2} - 2 \, n x^{2} \log \left (c x^{n}\right )\right )} a b^{2} - \frac {3}{8} \, {\left (2 \, n x^{2} \log \left (c x^{n}\right )^{2} + {\left (n^{2} x^{2} - 2 \, n x^{2} \log \left (c x^{n}\right )\right )} n\right )} b^{3} \]

[In]

integrate(x*(a+b*log(c*x^n))^3,x, algorithm="maxima")

[Out]

1/2*b^3*x^2*log(c*x^n)^3 + 3/2*a*b^2*x^2*log(c*x^n)^2 - 3/4*a^2*b*n*x^2 + 3/2*a^2*b*x^2*log(c*x^n) + 1/2*a^3*x
^2 + 3/4*(n^2*x^2 - 2*n*x^2*log(c*x^n))*a*b^2 - 3/8*(2*n*x^2*log(c*x^n)^2 + (n^2*x^2 - 2*n*x^2*log(c*x^n))*n)*
b^3

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 262 vs. \(2 (69) = 138\).

Time = 0.34 (sec) , antiderivative size = 262, normalized size of antiderivative = 3.40 \[ \int x \left (a+b \log \left (c x^n\right )\right )^3 \, dx=\frac {1}{2} \, b^{3} n^{3} x^{2} \log \left (x\right )^{3} - \frac {3}{4} \, b^{3} n^{3} x^{2} \log \left (x\right )^{2} + \frac {3}{2} \, b^{3} n^{2} x^{2} \log \left (c\right ) \log \left (x\right )^{2} + \frac {3}{4} \, b^{3} n^{3} x^{2} \log \left (x\right ) - \frac {3}{2} \, b^{3} n^{2} x^{2} \log \left (c\right ) \log \left (x\right ) + \frac {3}{2} \, b^{3} n x^{2} \log \left (c\right )^{2} \log \left (x\right ) + \frac {3}{2} \, a b^{2} n^{2} x^{2} \log \left (x\right )^{2} - \frac {3}{8} \, b^{3} n^{3} x^{2} + \frac {3}{4} \, b^{3} n^{2} x^{2} \log \left (c\right ) - \frac {3}{4} \, b^{3} n x^{2} \log \left (c\right )^{2} + \frac {1}{2} \, b^{3} x^{2} \log \left (c\right )^{3} - \frac {3}{2} \, a b^{2} n^{2} x^{2} \log \left (x\right ) + 3 \, a b^{2} n x^{2} \log \left (c\right ) \log \left (x\right ) + \frac {3}{4} \, a b^{2} n^{2} x^{2} - \frac {3}{2} \, a b^{2} n x^{2} \log \left (c\right ) + \frac {3}{2} \, a b^{2} x^{2} \log \left (c\right )^{2} + \frac {3}{2} \, a^{2} b n x^{2} \log \left (x\right ) - \frac {3}{4} \, a^{2} b n x^{2} + \frac {3}{2} \, a^{2} b x^{2} \log \left (c\right ) + \frac {1}{2} \, a^{3} x^{2} \]

[In]

integrate(x*(a+b*log(c*x^n))^3,x, algorithm="giac")

[Out]

1/2*b^3*n^3*x^2*log(x)^3 - 3/4*b^3*n^3*x^2*log(x)^2 + 3/2*b^3*n^2*x^2*log(c)*log(x)^2 + 3/4*b^3*n^3*x^2*log(x)
 - 3/2*b^3*n^2*x^2*log(c)*log(x) + 3/2*b^3*n*x^2*log(c)^2*log(x) + 3/2*a*b^2*n^2*x^2*log(x)^2 - 3/8*b^3*n^3*x^
2 + 3/4*b^3*n^2*x^2*log(c) - 3/4*b^3*n*x^2*log(c)^2 + 1/2*b^3*x^2*log(c)^3 - 3/2*a*b^2*n^2*x^2*log(x) + 3*a*b^
2*n*x^2*log(c)*log(x) + 3/4*a*b^2*n^2*x^2 - 3/2*a*b^2*n*x^2*log(c) + 3/2*a*b^2*x^2*log(c)^2 + 3/2*a^2*b*n*x^2*
log(x) - 3/4*a^2*b*n*x^2 + 3/2*a^2*b*x^2*log(c) + 1/2*a^3*x^2

Mupad [B] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.43 \[ \int x \left (a+b \log \left (c x^n\right )\right )^3 \, dx=x^2\,\left (\frac {a^3}{2}-\frac {3\,a^2\,b\,n}{4}+\frac {3\,a\,b^2\,n^2}{4}-\frac {3\,b^3\,n^3}{8}\right )+\frac {x^2\,\ln \left (c\,x^n\right )\,\left (3\,a^2\,b-3\,a\,b^2\,n+\frac {3\,b^3\,n^2}{2}\right )}{2}+\frac {x^2\,{\ln \left (c\,x^n\right )}^2\,\left (3\,a\,b^2-\frac {3\,b^3\,n}{2}\right )}{2}+\frac {b^3\,x^2\,{\ln \left (c\,x^n\right )}^3}{2} \]

[In]

int(x*(a + b*log(c*x^n))^3,x)

[Out]

x^2*(a^3/2 - (3*b^3*n^3)/8 + (3*a*b^2*n^2)/4 - (3*a^2*b*n)/4) + (x^2*log(c*x^n)*(3*a^2*b + (3*b^3*n^2)/2 - 3*a
*b^2*n))/2 + (x^2*log(c*x^n)^2*(3*a*b^2 - (3*b^3*n)/2))/2 + (b^3*x^2*log(c*x^n)^3)/2